/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.wx.entity;

import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.modules.sys.entity.Office;
import com.jeesite.modules.sys.entity.User;
import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

import java.util.List;

/**
 * wx_businessEntity
 * @author wangjianxin
 * @version 2018-09-28
 */
@Table(name="wx_business", alias="a",columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="name", attrName="name", label="商家名称", queryType=QueryType.LIKE),
		@Column(name="pic", attrName="pic", label="商家图片"),
		@Column(name="phone", attrName="phone", label="phone"),
		@Column(name="phone_res", attrName="phoneRes", label="备用手机号"),
		@Column(name="address", attrName="address", label="address"),
		@Column(name="content", attrName="content", label="content"),
		@Column(includeEntity=DataEntity.class),
		@Column(name="radio", attrName="radio", label="radio"),
		@Column(name="flag", attrName="flag", label="flag"),
		@Column(name="vip_card_img", attrName="vipCardImg", label="vip_card_Img"),
		@Column(name="detail_img", attrName="detailImg", label="商家详情图片"),
		@Column(name="hexiao_password", attrName="hexiaoPassword", label="核销密码"),
		@Column(name="video_img", attrName="videoImg", label="核销密码"),
		@Column(name="after_count", attrName="afterCount", label="商家的核销总数字"),
		@Column(name="weizhi_left", attrName="weizhiLeft", label="商家的核销总数字"),
		@Column(name="weizhi_right", attrName="weizhiRight", label="商家的核销总数字"),
		@Column(name="gongzonghao", attrName="gongzonghao", label="公众号链接"),
		@Column(name="group_id", attrName="groupId", label="商家的分组id")
	},
		joinTable={
				@JoinTable(type= JoinTable.Type.LEFT_JOIN, entity= WxBusinessGroupOrgConfig.class, attrName="wxBusinessGroupOrgConfig", alias="c",
						on="c.id = a.group_id", columns={
						@Column(name="id", label="id", isPK=true),
						@Column(name="group_name", label="分组名称", isQuery=false),
				}),
		},orderBy="a.update_date DESC"
)
public class WxBusiness extends DataEntity<WxBusiness> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 商家名称
	private String pic;		// 商家图片
	private String phone;		// phone
	private String phoneRes;		// 备用手机号
	private String address;		// address
	private String content;		// content
	private String radio;		// radio
	private Long flag;		// flag
	private String vipCardImg;
	private String detailImg;
	private String hexiaoPassword;
	private String weizhiLeft;
	private String weizhiRight;
	private String videoImg;
	/**
	 * 商家的分组id
	 */
	private Long groupId;

	/**
	 * 公众号链接
	 */
	private String gongzonghao;

	private List<WxBusiness> detailImgList;

	/**
	 * 添加字段商家的员工个数
	 */
	private Long userCount;

	/**
	 * 商家的核销数量
	 */
	private Integer afterCount;

	/**
	 * 关联查询出来的
	 */
	private WxBusinessGroupOrgConfig wxBusinessGroupOrgConfig;

	/**
	 * 添加字段商家属于的活动id
	 */
	private String activityId;

	/**
	 * 添加字段，商家修改分组的时候，之前的分组id
	 */
	private Long oldGroupId;
	
	public WxBusiness() {
		this(null);
	}

	public WxBusiness(String id){
		super(id);
	}
	
	@Length(min=0, max=200, message="商家名称长度不能超过 200 个字符")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=0, max=500, message="商家图片长度不能超过 500 个字符")
	public String getPic() {
		return pic;
	}

	public void setPic(String pic) {
		this.pic = pic;
	}
	
	@Length(min=0, max=200, message="phone长度不能超过 200 个字符")
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	@Length(min=0, max=200, message="备用手机号长度不能超过 200 个字符")
	public String getPhoneRes() {
		return phoneRes;
	}

	public void setPhoneRes(String phoneRes) {
		this.phoneRes = phoneRes;
	}
	
	@Length(min=0, max=200, message="address长度不能超过 200 个字符")
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
	
	@Length(min=0, max=6000, message="content长度不能超过 6000 个字符")
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}
	
	@Length(min=0, max=200, message="radio长度不能超过 200 个字符")
	public String getRadio() {
		return radio;
	}

	public void setRadio(String radio) {
		this.radio = radio;
	}
	
	public Long getFlag() {
		return flag;
	}

	public void setFlag(Long flag) {
		this.flag = flag;
	}

	public String getVipCardImg() {
		return vipCardImg;
	}

	public void setVipCardImg(String vipCardImg) {
		this.vipCardImg = vipCardImg;
	}

	public String getDetailImg() {
		return detailImg;
	}

	public void setDetailImg(String detailImg) {
		this.detailImg = detailImg;
	}

	public List<WxBusiness> getDetailImgList() {
		return detailImgList;
	}

	public void setDetailImgList(List<WxBusiness> detailImgList) {
		this.detailImgList = detailImgList;
	}

	public String getHexiaoPassword() {
		return hexiaoPassword;
	}

	public void setHexiaoPassword(String hexiaoPassword) {
		this.hexiaoPassword = hexiaoPassword;
	}

	public String getVideoImg() {
		return videoImg;
	}

	public void setVideoImg(String videoImg) {
		this.videoImg = videoImg;
	}

	public Long getUserCount() {
		return userCount;
	}

	public void setUserCount(Long userCount) {
		this.userCount = userCount;
	}

	public Integer getAfterCount() {
		return afterCount;
	}

	public void setAfterCount(Integer afterCount) {
		this.afterCount = afterCount;
	}

	public String getWeizhiLeft() {
		return weizhiLeft;
	}

	public void setWeizhiLeft(String weizhiLeft) {
		this.weizhiLeft = weizhiLeft;
	}

	public String getWeizhiRight() {
		return weizhiRight;
	}

	public void setWeizhiRight(String weizhiRight) {
		this.weizhiRight = weizhiRight;
	}

	public String getGongzonghao() {
		return gongzonghao;
	}

	public void setGongzonghao(String gongzonghao) {
		this.gongzonghao = gongzonghao;
	}

	public Long getGroupId() {
		return groupId;
	}

	public void setGroupId(Long groupId) {
		this.groupId = groupId;
	}

	public WxBusinessGroupOrgConfig getWxBusinessGroupOrgConfig() {
		return wxBusinessGroupOrgConfig;
	}

	public void setWxBusinessGroupOrgConfig(WxBusinessGroupOrgConfig wxBusinessGroupOrgConfig) {
		this.wxBusinessGroupOrgConfig = wxBusinessGroupOrgConfig;
	}

	public String getActivityId() {
		return activityId;
	}

	public void setActivityId(String activityId) {
		this.activityId = activityId;
	}

	public Long getOldGroupId() {
		return oldGroupId;
	}

	public void setOldGroupId(Long oldGroupId) {
		this.oldGroupId = oldGroupId;
	}
}